#include"mine.hpp"

bool Mine::PassFunction(User& user,std::vector<Land>& map,std::unordered_map<int,User*>& users) {
	auto recentpos=user.GetPos();
	int getcredit=0;
	//0~28~34~63 64~69
	for(int i=64;i<70;i++)
	{
		if (recentpos==i)
		{
			switch (70-recentpos)
			{
			case 1:
				getcredit=20;
				break;
			case 2:
				getcredit=80;
				break;
			case 3:
				getcredit=100;
				break;
			case 4:
				getcredit=40;
				break;
			case 5:
				getcredit=80;
				break;
			case 6:
				getcredit=60;
				break;
			default:
				getcredit=0;
				break;
			}
			printf("你路过了%d号矿地,你将得到%d点点数\n",70-recentpos, getcredit);
			auto precredit=user.GetCredit();
			user.SetCredit(precredit+getcredit);
			printf("你现在的点数为%d\n",precredit+getcredit); 
		}

	}
	return false;
}
